import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// 导入vant
import Vant from 'vant'
import 'vant/lib/index.css'

// 全局样式 让我们的样式覆盖vant的样式
import './styles/index.less'
// 导入字体图标样式
import './styles/iconfont.css'

// 脚手架中导包不加路径默认会进入node_modules中查找
import 'amfe-flexible'

// import '@/utils/dayjs.js'

import * as filters from '@/filters'
import Sgui from '@/components/sg-ui'
// console.log(Sgui)
Vue.use(Sgui)
// Object.keys(filters)
Object.keys(filters).forEach(item => {
  // item: formatDate nameFormat
  Vue.filter(item, filters[item])
})

Vue.use(Vant)

// Vue.use = function(obj) {
//   obj.install(Vue)
// }

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
